<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        input {
            
            outline: 1px solid orange;
        }

    </style>
</head>
<body>
    <input type="text" value="邮箱/ID/手机号">
    <script>
      var inp = document.querySelector('input')
      inp.onfocus = function(){
          if(this.value=='邮箱/ID/手机号'){
                    this.value = ''
          }
      }
      inp.onblur = function(){
          if(this.value == ''){
                             this.value = '邮箱/ID/手机号'
                             this.style.color = 'red'
          }
      }
    </script>
</body>
</html>